/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.comut.crud.pojo.mobile;

import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author asantos
 */
@XmlRootElement( )
@XmlAccessorType(XmlAccessType.FIELD)
public class Mobile implements Serializable{
    
    
    private static final long serialVersionUID = 123534;
    private int uid = -1;
        
        
    private String alias = null;
    private String license_plate = null;
    private String serial_number = null;
    private Integer id_fleet = null;
    private Integer id_mobile = null;
    //private String device_type = null;
    private String imei = null;
    private String gsm_number = null;
    private String iccid = null;
    private String equipment_type = null;
    
    //optional   
    private String id_image = null;
    private String vehicle_type = null;
    private String brand = null;
    private String model = null;
    private String owner = null;
    private String fuel_error_coefficient = null;

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getEquipment_type() {
        return equipment_type;
    }

    public void setEquipment_type(String equipment_type) {
        this.equipment_type = equipment_type;
    }

    public String getFuel_error_coefficient() {
        return fuel_error_coefficient;
    }

    public void setFuel_error_coefficient(String fuel_error_coefficient) {
        this.fuel_error_coefficient = fuel_error_coefficient;
    }

    public String getGsm_number() {
        return gsm_number;
    }

    public void setGsm_number(String gsm_number) {
        this.gsm_number = gsm_number;
    }

    public String getIccid() {
        return iccid;
    }

    public void setIccid(String iccid) {
        this.iccid = iccid;
    }


    public Integer getId_fleet() {
        return id_fleet;
    }

    public void setId_fleet(Integer id_fleet) {
        this.id_fleet = id_fleet;
    }

    public String getId_image() {
        return id_image;
    }

    public void setId_image(String id_image) {
        this.id_image = id_image;
    }

    public Integer getId_mobile() {
        return id_mobile;
    }

    public void setId_mobile(Integer id_mobile) {
        this.id_mobile = id_mobile;
    }

    public String getImei() {
        return imei;
    }

    public void setImei(String imei) {
        this.imei = imei;
    }

    public String getLicense_plate() {
        return license_plate;
    }

    public void setLicense_plate(String license_plate) {
        this.license_plate = license_plate;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public String getSerial_number() {
        return serial_number;
    }

    public void setSerial_number(String serial_number) {
        this.serial_number = serial_number;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public String getVehicle_type() {
        return vehicle_type;
    }

    public void setVehicle_type(String vehicle_type) {
        this.vehicle_type = vehicle_type;
    }

    
    public boolean isValid() {
        if(alias==null || alias.equals("")|| license_plate==null || license_plate.equals("")|| serial_number==null || serial_number.equals("")|| 
           id_fleet==null || id_fleet < 1 || id_mobile==null || id_mobile < 1 || imei==null || imei.equals("") || gsm_number==null || gsm_number.equals("") ||
           iccid==null || iccid.equals("") || equipment_type==null || equipment_type.equals(""))
            return false;
        
        return true;
    }

    @Override
    public String toString() {
        return "Mobile{" + "uid=" + uid + ", alias=" + alias + ", license_plate=" + license_plate + ", serial_number=" + serial_number + ", id_fleet=" + id_fleet + ", id_mobile=" + id_mobile + ", imei=" + imei + ", gsm_number=" + gsm_number + ", iccid=" + iccid + ", equipment_type=" + equipment_type + ", id_image=" + id_image + ", vehicle_type=" + vehicle_type + ", brand=" + brand + ", model=" + model + ", owner=" + owner + ", fuel_error_coefficient=" + fuel_error_coefficient + '}';
    }
    
    
}
